#include <iostream>

using namespace std;

int main() {
    int max_value = 0, position;

    for (int i = 1; i <= 100; i++) {
        int value;
        cin >> value;

        if (value > max_value) {
            max_value = value;
            position = i;
        }
    }

    cout << max_value << endl << position << endl;

    return 0;
}
